Document extraction: four main approaches with a 1000x cost difference
I went down a rabbit hole comparing four ways to turn unstructured documents into structured data: full LLM inference, fine-tuned small models, template-based extraction, and cloud OCR. The cost spread floored me. A template reads a document for about $0.001, where full LLM inference runs $5 to $15 on the same PDF and the same fields. Most teams pay LLM prices for forms a regex could handle. If you classify each document upfront and send it to the cheapest tool that can do the job, you cut costs by 85% and still keep the big model in reserve for the genuinely weird formats.